(function(){
    var _moduleMap = {
        "core":'../dist/core',
        "home":'../dist/home',
        "search":'../dist/search',
        "secondPage":'../dist/secondPage',
        "thirdPage":'../dist/thirdPage'
    };

    requirejs.config({
        baseUrl:'js/lib',
        paths:_moduleMap,
        map: {
            '*': {
                'css': 'css'
            }
        },
        shim:{
            'core':['jquery','underscore']
        }
    });

    requirejs(["jquery"],function($){
        var target = $('script:first').data("module");
        require([target]);
    });
})();